//
//  CZUUIDManager.m
//  nsj_iOS
//
//  Created by apple on 2017/1/6.
//  Copyright © 2017年 GCZ. All rights reserved.
//

#import "CZUUIDManager.h"
#import "CZKeyChain.h"

static NSString * const KEY_IN_KEYCHAIN = @"com.kuaidian.app.nsjiOSgcz"; //这里写自己项目的bundleId
static NSString * const KEY_UUID = @"com.kuaidian.app.nsjiOSgcz";//这里写自己项目的bundleId
@implementation CZUUIDManager
+(void)saveUUID:(NSString *)uuid {
    NSMutableDictionary *usernameUuidPairs = [NSMutableDictionary dictionary];
    [usernameUuidPairs setObject:uuid forKey:KEY_UUID];
    [CZKeyChain save:KEY_IN_KEYCHAIN data:usernameUuidPairs];
}

+(id)readUUID {
    NSMutableDictionary *usernameUuidPairs = (NSMutableDictionary *)[CZKeyChain load:KEY_IN_KEYCHAIN];
    return [usernameUuidPairs objectForKey:KEY_UUID];
}

+(void)deleteUUID {
    [CZKeyChain kqDelete:KEY_IN_KEYCHAIN];
}
@end
